home *** CD-ROM | disk | FTP | other *** search
Makefile | 1996-10-25 | 3.3 KB | 155 lines |
- # Makefile - For updating/installing DNS data files
- #
- # $Id: soa-easy.shar,v 8.2 1996/10/25 17:08:00 vixie Exp $
- # $Source: /proj/src/isc/cvs-1/bind/contrib/misc/soa-easy.shar,v $
- #
- # DESCRIPTION
- # If you add a new file, you must add it to the appropriate
- # macro below. If the file is a ".zone" file, you should
- # also add a ".SOA" file to one of the SOA macros below, and do
- # a "make depend". This will ensure the ".SOA" file is
- # generated and updated properly.
- #
- # If you add or remove an $INCLUDE directive in any file,
- # do a "make depend".
- #
- # NOTE
- # Part of the contents of this file are modified by the "depend"
- # target.
-
-
- DIR = /local/domain
- USER = root
- GROUP = root
- MODE = 440
-
- #
- # Name of an authoritative root nameserver
- #
- AUTH_ROOT_NS = NIC.NORDU.NET
-
- #
- # These may need customisation
- #
- INSTALL = op install -o $(USER) -g $(GROUP) -m $(MODE)
- CONFIGURE = op named.reload
-
-
- MISC = named.boot root.cache localhost.zone \
- 0.0.127.IN-ADDR.ARPA.zone
-
- #
- # These macros will have to be customised
- #
- FORWARD = \
- example.org.au.zone \
- sub.example.org.au.zone net.example.org.au.zone \
- client.org.au.zone
-
- FORWARD_SOA = \
- example.org.au.SOA \
- sub.example.org.au.SOA net.example.org.au.SOA \
- client.org.au.SOA
-
- REVERSE = \
- 254.191.IN-ADDR.ARPA.zone \
- 1.254.191.IN-ADDR.ARPA.zone 16.254.191.IN-ADDR.ARPA.zone \
- 16.254.191.IN-ADDR.ARPA.zone \
- 253.191.IN-ADDR.ARPA.zone
-
- REVERSE_SOA = \
- 254.191.IN-ADDR.ARPA.SOA \
- 1.254.191.IN-ADDR.ARPA.SOA 16.254.191.IN-ADDR.ARPA.SOA \
- 16.254.191.IN-ADDR.ARPA.SOA \
- 253.191.IN-ADDR.ARPA.SOA
-
- INCLUDE = \
- NS.generic MX.generic \
- sub-pcs.example.org.au.inc
-
- ZONES = $(FORWARD) $(REVERSE)
-
- SOAS = $(FORWARD_SOA) $(REVERSE_SOA)
-
- #
- # These files are considered removable
- #
- CLEAN = $(ZONES) $(SOAS) $(MISC)
-
- #
- # This order is important (in case named is restarted during install)
- #
- DEPENDANT = $(INCLUDES) $(ZONES)
- FILES = $(MISC) $(DEPENDANT) $(SOAS)
-
-
- #
- # Custom make rules
- #
- .SUFFIXES: .zone .SOA $(SUFFIXES)
-
- .zone.SOA:
- ./make-SOA -o $@ $<
-
- .DEFAULT:
- co $@
-
-
-
- all : $(FILES)
-
- #
- # To get an up-to-date root.cache, we ask an authoritative root
- # nameserver.
- #
- root.cache :
- dig @$(AUTH_ROOT_NS) . NS > dig.out && mv -f dig.out $@
-
- install : install.timestamp
-
- #
- # By using $?, only those files changed since last install are
- # installed. This can save a lot of time.
- #
- install.timestamp : $(FILES)
- @for f in $? ;\
- do \
- echo "$(INSTALL) $$f $(DIR)/$$f" ;\
- $(INSTALL) $$f $(DIR)/$$f ;\
- done
- @touch $@
- @chmod 660 2>/dev/null || true $@
-
- #
- # Target that makes changes take effect
- #
- configure : install
- $(CONFIGURE)
-
- #
- # clean is tidy; clobbered is very tidy, but will cause work to regenerate
- #
- clean :
- rm -f *~ core
-
- clobber : clean
- rm -f $(CLEAN) install.timestamp
-
- depend : $(DEPENDANT)
- sed '/^# --MAKEDEPEND--.*DO NOT DELETE/q' < Makefile > Makefile.new
- ./make-depend $(SOAS) >> Makefile.new
- mv -f Makefile Makefile.old
- mv -f Makefile.new Makefile
-
- #
- # --MAKEDEPEND-- DO NOT DELETE THIS LINE, or modify anything below it
- example.org.au.SOA : NS.generic MX.generic
- sub.example.org.au.SOA : NS.generic MX.generic sub-pcs.example.org.au.inc
- net.example.org.au.SOA : NS.generic MX.generic
- client.org.au.SOA : NS.generic MX.generic
- 254.191.IN-ADDR.ARPA.SOA : NS.generic
- 1.254.191.IN-ADDR.ARPA.SOA : NS.generic
- 16.254.191.IN-ADDR.ARPA.SOA : NS.generic
- 16.254.191.IN-ADDR.ARPA.SOA : NS.generic
- 253.191.IN-ADDR.ARPA.SOA : NS.generic
-